<%@page import="projectchumashgeniusproject.Book"%>
<%@page import="org.apache.commons.lang3.EnumUtils"%>
<%@page import="projectchumashgeniusproject.ProjectChumashGeniusProject.BookName"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%  
    String bookNameParameter = request.getParameter("BookName");
    BookName bookName = EnumUtils.getEnum(BookName.class, bookNameParameter);
    
    if (bookName == null){
        bookName = BookName.GENESIS;
    }
    int numOfChapters = new Book(bookName).getChapters().size();
    out.print(numOfChapters);
%>

